<%/*
 Vosao CMS. Simple CMS for Google App Engine.
 
 Copyright (C) 2009-2011 Vosao development team.

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

 email: vosao.dev@gmail.com
*/%>

<div id="breadcrumbs">
    <span class="button ui-state-default ui-corner-all" style="padding:4px 10px;">
        <a href="#folders"><%= messages("resources") %>:</a> /
        <span id="crumbs"></span>
    </span>
</div>

<div id="tabs" style="top:14px;">
<ul>
    <li><a href="#tab-1"><%= messages("folder") %></a></li>
    <li class="filesTab"><a href="#tab-2"><%= messages("files") %></a></li>
    <li class="childrenTab"><a href="#tab-3"><%= messages("subfolders") %></a></li>
    <li class="securityTab"><a href="#tab-4"><%= messages("security") %></a></li>
</ul>

<div id="tab-1">
<form id="folderForm">
<div class="form-row">
    <label><%= messages("title") %></label>
    <input id="title" type="text" class="form-title" />
</div>
<div class="form-row">
    <label><%= messages("folder.name_for_url") %></label>
    <input id="name" type="text" class="form-url"/>
</div>
<div class="buttons">
    <input id="saveButton" type="submit" value="<%= messages("save") %>" />
    <input id="cancelButton" type="button" value="<%= messages("cancel") %>" />
    <input id="exportButton" type="button" value="<%= messages("export") %>" />
</div>    
</form>
</div>

<div id="tab-2" class="filesTab">
    <div id="filesTable"> </div>
    <div class="buttons">
        <input id="createFileButton" type="button" 
            value="<%= messages("create_file") %>" />
        <input id="uploadButton" type="button" 
            value="<%= messages("upload_file") %>" />
        <input id="deleteFilesButton" type="button" 
            value="<%= messages("delete_files") %>" />
        <input id="fileCancelButton" type="button" 
            value="<%= messages("cancel") %>" />
    </div>
</div>

<div id="tab-3" class="childrenTab">
    <div id="children"> </div>
    <div class="buttons">
        <input id="addChildButton" type="button" 
            value="<%= messages("folder.add_child_folder") %>" />
        <input id="deleteFoldersButton" type="button" 
            value="<%= messages("folder.delete_folders") %>" />
        <input id="folderCancelButton" type="button" 
            value="<%= messages("cancel") %>" />
    </div>    
</div>

<div id="tab-4" class="securityTab">
    <div id="permissions"> </div>
    <div class="buttons">
        <input id="addPermissionButton" type="button" 
            value="<%= messages("add_permission") %>" />
        <input id="deletePermissionButton" type="button" 
            value="<%= messages("delete_permission") %>" />
    </div>    
</div>

</div>

<div id="file-upload" title="<%= messages("folder.upload_file") %>" style="display:none">
	<form id="upload" action="/cms/upload" method="post" enctype="multipart/form-data">
    	<%= messages("file_upload") %>:
    	<input type="hidden" name="fileType" value="resource" />
    	<input type="hidden" name="folderId" />
    	<input type="file" name="uploadFile" multiple="true" />
	    <div class="buttons-dlg">
    	    <input type="submit" value="<%= messages("send") %>" />
        	<input id="fileUploadCancelButton" type="button" 
            	value="<%= messages("cancel") %>" />
    	</div>
	</form>
</div>

<div id="permission-dialog" style="display:none" title="<%= messages("permission_details") %>">
<form id="permissionForm">
    <div class="form-row">
        <label><%= messages("group") %></label>
        <select id="groupSelect"></select>
        <span id="groupName"></span>        
    </div>
    <div id="permissionList" class="form-row">
        <fieldset>
            <legend><%= messages("permission") %></legend>
            <input type="radio" name="permission" value="DENIED"/> <%= messages("denied") %> <br />
            <input type="radio" name="permission" value="READ" /> <%= messages("read") %> <br />
            <input type="radio" name="permission" value="WRITE" /> <%= messages("read_write") %> <br />
        </fieldset>        
    </div>
    <div class="buttons-dlg">
        <input id="permissionSaveButton" type="submit" value="<%= messages("save") %>" />
        <input id="permissionCancelButton" type="button" value="<%= messages("cancel") %>" />
    </div>
</form>
</div>

<div id="export-dialog" style="display:none" title="<%= messages("folder.export_window") %>">
  <form id="exportForm">
    <p><%= messages("folder.export_window_info") %></p>
    <div id="exportInfo" class="form-row"></div>    
    <div id="timer" class="form-row"></div>
    <div class="buttons-dlg">
        <input id="exportCancelButton" type="button" value="<%= messages("cancel") %>" />
    </div>
  </form>
</div>

